package com.hdyg.sixg.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hdyg.sixg.R;
import com.hdyg.sixg.entry.NativeGuideBean;
import com.hdyg.sixg.entry.NoticeBean;

import java.util.List;

/**
 * @author CZB
 * @describe 公告适配器
 * @time 2019/3/20 14:22
 */
public class NoticeAdapter extends BaseQuickAdapter<NoticeBean.NoticeListBean, BaseViewHolder> {
    public NoticeAdapter(int layoutResId, @Nullable List<NoticeBean.NoticeListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, NoticeBean.NoticeListBean item) {
        String str = String.format(mContext.getResources().getString(R.string.notice_item_title), item.getTitle(), item.getCreated_at());
        helper.setText(R.id.tv_title, str);
    }
}
